﻿using Newtonsoft.Json;

namespace Dyao.Book.Contract
{
    public class BookFilterDto : PaginationFilterDto
    {
        /// <summary>
        /// 书名
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 作者
        /// </summary>
        public string Author { get; set; }

        /// <summary>
        /// 书源
        /// </summary>
        public BookSourceType? SourceType { get; set; }
    }

    public class BookResultDto
    {

        /// <summary>
        /// ID
        /// </summary>
        [JsonProperty("id")]
        public string ID { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 作者
        /// </summary>
        public string Author { get; set; }

        /// <summary>
        /// 封面图片
        /// </summary>
        public string CoverPicture { get; set; }

        /// <summary>
        /// 分类
        /// </summary>
        public string Category { get; set; }

        /// <summary>
        /// 子分类
        /// </summary>
        public string SubCategory { get; set; }

        /// <summary>
        /// 爬虫Url
        /// </summary>
        public string SpiderUrl { get; set; }

        /// <summary>
        /// 来源书籍编号
        /// </summary>
        public int SourceBookId { get; set; }

        /// <summary>
        /// 来源类型
        /// </summary>
        public BookSourceType SourceType { get; set; }

        /// <summary>
        /// 用户名称
        /// </summary>
        public string CreateUserName { get; set; }

        /// <summary>
        /// 爬取时间
        /// </summary>
        public DateTime CreateDateTime { get; set; }

        /// <summary>
        /// 用户名称
        /// </summary>
        public string UpdateUserName { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateDateTime { get; set; }

        /// <summary>
        /// 完本
        /// </summary>
        public bool Completed { get; set; }

        /// <summary>
        /// 同步章节时间
        /// </summary>
        public DateTime? SyncChapterDate { get; set; }

        /// <summary>
        /// 是否匹配源
        /// </summary>
        public bool IsMatchSource { get; set; }
    }
}
